<!DOCTYPE HTML>
<html lang="en">
<head>
<title>SoundGetWaveVolume - Syntax &amp; Usage | AutoHotkey</title>
<meta name="description" content="The SoundGetWaveVolume command retrieves the wave output volume of a sound device." />
<meta name="ahk:equiv-v2" content="commands/SoundGet.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>SoundGetWaveVolume</h1>

<p>Retrieves the wave output volume of a sound device.</p>

<pre class="Syntax"><span class="func">SoundGetWaveVolume</span>, OutputVar <span class="optional">, DeviceNumber</span></pre>
<h2>Parameters</h2>
<dl>

  <dt>OutputVar</dt>
  <dd><p>The name of the variable in which to store the retrieved volume level, which is a floating point number between 0 and 100 inclusive. The variable will be made blank if there was a problem retrieving the volume. The format of the floating point number, such as its decimal places, is determined by <a href="SetFormat.htm">SetFormat</a>.</p></dd>

  <dt>DeviceNumber</dt>
  <dd><p>If this parameter is omitted, it defaults to 1 (the first sound device), which is usually the system's default device for recording and playback. Specify a number higher than 1 to operate upon a different sound device.</p></dd>

</dl>
<h2>Error Handling</h2>
<p><span class="ver">[v1.1.04+]</span>: This command is able to throw an exception on failure. For more information, see <a href="Catch.htm#RuntimeErrors">Runtime Errors</a>.</p>
<p><a href="../misc/ErrorLevel.htm">ErrorLevel</a> is set to 1 if there was a problem or 0 otherwise.</p>
<h2>Remarks</h2>
<p>The current wave output volume level can be set via <a href="SoundSetWaveVolume.htm">SoundSetWaveVolume</a>. Settings such as Master Volume, Synth, Microphone, Mute, Treble, and Bass can be set and retrieved using <a href="SoundSet.htm">SoundSet</a> and <a href="SoundGet.htm">SoundGet</a>.</p>
<p><span class="ver">[v1.1.10+]</span>: On Windows Vista and later, this command is equivalent to <a href="SoundGet.htm">SoundGet</a> with <em>ComponentType</em> set to <code>Wave</code> and <em>ControlType</em> set to <code>Volume</code>.</p>
<h2>Related</h2>
<p><a href="SoundSetWaveVolume.htm">SoundSetWaveVolume</a>, <a href="SoundSet.htm">SoundSet</a>, <a href="SoundGet.htm">SoundGet</a>, <a href="SoundPlay.htm">SoundPlay</a></p>
<h2>Examples</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>SoundGetWaveVolume, OutputVar
MsgBox, The current wave output volume level is %OutputVar%`%.</pre>
</div>

</body>
</html>
